package com.zlt.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.zlt.annotation.Column;
import com.zlt.annotation.Id;
import com.zlt.annotation.Table;

import javax.xml.crypto.Data;

@Table(name = "admin")
public class Admin {

    @Id(name = "admin_id")
    private int aid;// 管理员id

    @Column(name = "admin_name")
    @JSONField
    private String name;// 管理员名

    @Column
    @JSONField
    private String password;// 管理员密码

    @Column
    @JSONField
    private String phone;// 管理员电话

    @Column
    @JSONField(name = "nickname")
    private String nickName;// 管理员昵称

    @Column(name = "createtime")
    @JSONField
    private Data createTime;// 创建时间

    @Column(name = "logintime")
    @JSONField
    private Data loginTime;// 登陆时间

    public Admin() {
    }

    public Admin(int aid, String name, String password, String phone, String nickName, Data createTime, Data loginTime) {
        this.aid = aid;
        this.name = name;
        this.password = password;
        this.phone = phone;
        this.nickName = nickName;
        this.createTime = createTime;
        this.loginTime = loginTime;
    }

    public int getAid() {
        return aid;
    }

    public void setAid(int aid) {
        this.aid = aid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Data getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Data createTime) {
        this.createTime = createTime;
    }

    public Data getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Data loginTime) {
        this.loginTime = loginTime;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "aid=" + aid +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", nickName='" + nickName + '\'' +
                ", createTime=" + createTime +
                ", loginTime=" + loginTime +
                '}';
    }
}
